package com.dy.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: 评论实体类
 * @Date: 2021/6/1 11:13
 * @Version 1.0 (版本)
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("dy_comment")
public class DyCommentEntity implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 编码
     */
    @TableField(value = "code")
    private String code;
    /**
     * 博客编号
     */
    @TableField(value = "blog_code")
    private String blogCode;
    /**
     * 评论父编号
     */
    @TableField(value = "parent_code")
    private String parentCode;
    /**
     * 昵称
     */
    @TableField(value = "nickname")
    private String nickname;
    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;
    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;
    /**
     * 评论内容
     */
    @TableField(value = "content")
    private String content;
    /**
     * 删除标记
     */
    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;
    /**
     * 乐观锁
     */
    @TableField(value = "rowVersion",fill = FieldFill.INSERT)
    @Version
    private Integer rowVersion;
    /**
     * 创建时间
     */
    @TableField(value = "createTime",fill = FieldFill.INSERT)
    private Timestamp createTime;
    /**
     * 更新时间
     */
    @TableField(value = "updateTime",fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
